Is there a way to pass a variable as an argument in onClick handler function in an element